<script setup>
import { ref } from 'vue';
import MessageItem from './HomeUserCard.vue';

const messages = ref([
  {
    id: 1,
    name: 'Stephanie',
    image: 'https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=2550&q=80',
    content: 'I got your first assignment. It was quite good. 🥳 We can continue with the next assignment.',
    time: 'Dec, 12'
  },
  {
    id: 2,
    name: 'Mark',
    image: 'https://images.unsplash.com/photo-1600486913747-55e5470d6f40?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=2550&q=80',
    content: 'Hey, can tell me about progress of project? I\'m waiting for your response.',
    time: 'Dec, 12'
  },
  {
    id: 3,
    name: 'David',
    image: 'https://images.unsplash.com/photo-1543965170-4c01a586684e?ixid=MXwxMjA3fDB8MHxzZWFyY2h8NDZ8fG1hbnxlbnwwfDB8MHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=900&q=60',
    content: 'Awesome! 🤩 I like it. We can schedule a meeting for the next one.',
    time: 'Dec, 12'
  },
  {
    id: 4,
    name: 'Jessica',
    image: 'https://images.unsplash.com/photo-1533993192821-2cce3a8267d1?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MTl8fHdvbWFuJTIwbW9kZXJufGVufDB8fDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=900&q=60',
    content: 'I am really impressed! Can\'t wait to see the final result.',
    time: 'Dec, 11'
  }
]);
</script>

<template>
  <el-card class="messages-section">
    <template #header>
      <div class="projects-section-header">
        <p>Client Messages</p>
      </div>
    </template>
    <el-scrollbar class="messages" height="400px">
      <MessageItem v-for="message in messages" :key="message.id" :message="message" />
    </el-scrollbar>
  </el-card>
</template>

<style scoped>
.projects-section-header p {
  font-size: 18px;
  font-weight: bold;
  margin: 0;
}

.messages {
  padding: 16px;
}
</style>
